﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Load.aspx.cs" Inherits="GalGame.Load"
    EnableViewState="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="Scripts/Tool.js" type="text/javascript"></script>
    <script src="Scripts/config.js" type="text/javascript"></script>
    <script src="Scripts/load.js" type="text/javascript"></script>
    <script type="text/javascript">
        var GameMain = null;
        var GameWrite = null;
        var $obj = function (id) { return document.getElementById(id); }
        function main() {
            GameMain = $obj("GameMain").contentWindow;
            var load = new Load();
            load.ReadXml({
                callback: function (loadxml, _load) {
                    GameMain.Init(_load, loadxml);
                    GameMain.Preload(loadxml);
                },
                errcallback: function () {
                    alert("脚本数据请求失败，请重试");
                },
                context: this
            });
        }
        function ShowMain() {
            $obj("loading").style.display = "none";
            $obj("loaded").style.display = "";
        }
        function Start() {
            GameMain.Show();
            $obj("loaded").style.display = "none";
            $obj("GameMain").style.visibility = "";
        }
    </script>
</head>
<body onload="main()" style="margin: 0; padding: 0">
    <div id="loading">
        资源载入中...这可能需要一点时间请耐心等待～<br />
        <span style="color: Red">请注意：您必须使用支持HTML5的浏览器来访问！另由于服务器等因素，暂不支持Firefox。我推荐您使用chrome10、IE9浏览器来访问！</span>
    </div>
    <div id="loaded" style="display: none">
        <table style="position: absolute; left: 50%; margin-left: -400px">
            <tr>
                <td>
                    <div style="height: 600px; width: 800px; background-color: Black">
                        <img src="Images/System/loading.jpg" onclick="Start()" />
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <iframe id="GameMain" src="Game.aspx" marginheight="0" marginwidth="0" scrolling="yes"
        width="100%" height="100%" frameborder="0" style="position: fixed; visibility: hidden">
    </iframe>
</body>
</html>
